<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>搜索详情</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../css/mui.min.css">
		<link rel="stylesheet" href="../../css/app.css">
		<style>
			.mui-bar-nav~.mui-content{position:absolute;left:0;height:100%;overflow:auto;}
			.mui-bar-nav.mui-bar .mui-icon{color:#333;}
			/*搜索框*/
			.mui-search{width:4.76rem;margin:6px auto 0 .8rem;float:left;clear:none;}
			.mui-bar input[type=search]{height:.6rem;color:#0090ff;font-size:.28rem;background:#f3f3f3;margin:0;height:32px;border-radius:.8rem;padding-left:36px;}
			.mui-input-row.mui-search .mui-icon-speech{top:.1rem;font-size:18px;}
			.mui-input-row.mui-search .mui-icon-clear{top:.12rem;font-size:18px;}
			.mui-search .mui-placeholder{font-size:14px;line-height:35px;text-align:left;}
			.mui-search .mui-placeholder .mui-icon{font-size:18px;margin:8px 5px 0 10px;float:left;color:#a0a0a0;}
			.mui-bar .mui-search:before{font-size:18px;color:#a0a0a0;margin-left:10px;margin-right:5px;}
			.mui-bar .mui-input-row .mui-input-clear~.mui-icon-clear, .mui-bar .mui-input-row .mui-input-speech~.mui-icon-speech{color:#a0a0a0;top:-4px;}
			/*历史记录*/
			.hostory_title{width:100%;float:left;height:.85rem;line-height:.85rem;font-size:.32rem;box-sizing:border-box;padding-left:.33rem;color:#333;}
		   .hostory_title{width:100%;float:left;height:.85rem;line-height:.85rem;font-size:.32rem;box-sizing:border-box;padding-left:.33rem;color:#333;}
		    .hostory_list{width:100%;float:left;background:#fff;}
			.hostory_list>a{display:block;width:7.2rem;float:right;border-bottom:1px solid #d4d4d4;}
		    .hostory_list>a>img{width:.78rem;float:left;margin:.12rem .1rem .1rem .1rem;}
		    .hostory_list>a>.menu_cont{width:4.36rem;float:left;font-size:.3rem;color:#333;line-height:1.05rem;}
		    .hostory_list>a>.menu_show{float:left;font-size:.3rem;color:#666;line-height:1.05rem;}
		    .hostory_list>a>.menu_show>i{display:block;float:left;background:url(../images/index/show.png) no-repeat;background-size:100% auto;width:.38rem;height:.42rem;margin:.31rem .1rem 0 0;}
		    .clear_hostory{width:100%;line-height:.9rem;font-size:.3rem;color:#ff7800;text-align:center;border:none !important;}
			.clear_hostory>.mui-icon-trash{font-size:.4rem;color:#ff7800;}
			.mui-icon-arrowright{font-size:.35rem;}
			.list_title{width:7.1rem;float:left;font-size:.3rem;line-height:.55rem;margin-top:.2rem;color:#333;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
			.gray_info{width:7.1rem;float:left;font-size:.28rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#999;margin-bottom:.2rem;line-height:.35rem;}
			
			
		</style>
	</head>
	<body>
		
		<div class="mui-content">
		    <!--<h5 class="hostory_title">相关应用</h5>
		    <div class="hostory_list">
		    	<a>
		    		<img src="../../images/index/nav01-@2x.png">
		    		<span class="menu_cont">办事指南</span>
		    		<span class="menu_show"><i></i>查看应用</span>
		    	</a>
		    	<a>
		    		<img src="../../images/index/nav02-@2x.png">
		    		<span class="menu_cont">进度查询</span>
		    		<span class="menu_show"><i></i>查看应用</span>
		    	</a>
		    	<a>
		    		<img src="../../images/index/nav04-@2x.png">
		    		<span class="menu_cont">网点查询</span>
		    		<span class="menu_show"><i></i>查看应用</span>
		    	</a>
		    	<a class="clear_hostory">
		    		查看更多<i class="mui-icon mui-icon-arrowright"></i>
		    	</a>
		    </div>-->
		    <div id="bsznDiv">
			    <h5 class="hostory_title" v-if="hot_show">相关指南</h5>
			    <div class="hostory_list" >
			    	<template v-for="bszn in bsznList"  v-if="hot_show">
				    	<a  class="toTarget" :oid="bszn.oid" :modelType="bszn.modelType">
				    		<span class="list_title" v-html="bszn.title"></span>
				    		<span class="gray_info" v-html="bszn.content"></span>
				    	</a>
			    	</template>
			    	<a class="clear_hostory" v-if="more_show"  onclick="bsznMore()">
			    		查看更多<i class="mui-icon mui-icon-arrowright"></i>
			    	</a>
			    </div>
		    </div>
		    <!--<h5 class="hostory_title">常见问题</h5>
		    <div class="hostory_list" id="sxQuestionDiv">
		    	<template v-for="sxQuestion in sxQuestionList"  v-if="hot_show">
			    	<a>
			    		<span class="list_title" v-html="sxQuestion.ask"></span>
			    	</a>
		    	</template>
		    	<a class="clear_hostory" v-if="more_show"  onclick="sxQuestionMore()">
		    		查看更多<i class="mui-icon mui-icon-arrowright"></i>
		    	</a>
		    </div>-->
		    <div id="newsDiv">
			    <h5 class="hostory_title" v-if="hot_show">相关新闻</h5>
			    <div class="hostory_list" >
			    	<template v-for="news in newsList"  v-if="hot_show">
				    	<a class="toTarget" :oid="news.docId" :modelType="news.modelType">
				    		<span class="list_title" v-html="news.contentTitle"></span>
				    		<span class="gray_info" v-html="news.dateString"></span>
				    	</a>
			    	</template>
			    	<a class="clear_hostory" v-if="more_show"  onclick="newsMore()">
			    		查看更多<i class="mui-icon mui-icon-arrowright"></i>
			    	</a>
			    </div>
		    </div>
		    <div style="height:.2rem;width:100%;float:left;"></div>
		    <div class="no_message" id="no_message" style="display: none;">
		    	<img src="../../images/index/no_message.png">
		    	<p style="text-align: center;">暂时还没有任何相关内容~</p>
		    </div>
		</div>
		
		<script src="../../js/immersed.js"></script>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/common.js"></script>
		<script src="../../js/app.js"></script>
		<script src="../../js/vue.min.js"></script>
		<script>
			var bsznListAll=new Array();
			var newsListAll=new Array();
			mui.plusReady(function() {
				mui.back = function() {
					plus.webview.currentWebview().hide();
				}
			});
			
			window.addEventListener('initData',function(e){
				var self = plus.webview.currentWebview();
				var r = JSON.parse(e.detail.result_json);
				var arr_bszn = r.bsznRelatedData; //相关指南
				var arr_zcfg = r.newsData; //相关法规
				if((arr_bszn==null&&arr_zcfg==null)||(arr_bszn.length==0&&arr_zcfg.length==0)){
					document.getElementById("no_message").style.display="block";
					bszn_vue.hot_show = false;
					bszn_vue.bsznList = [];
					news_vue.more_show = false;
					news_vue.newsList = [];
					utils.closeWaiting();
					return ;
				}
				document.getElementById("no_message").style.display="none";
				//办事指南
				if(arr_bszn != null && arr_bszn.length > 0){
					bszn_vue.hot_show = true;
					if(arr_bszn.length >3){
						bszn_vue.more_show=true;
						bsznListAll=arr_bszn;
						var bszns=new Array();
						bszns.push(arr_bszn[0]);
						bszns.push(arr_bszn[1]);
						bszns.push(arr_bszn[2]);
						bszn_vue.bsznList=bszns;
					}else{
						bszn_vue.bsznList = arr_bszn;
					}
				}
				
				//政策法规
				if(arr_zcfg != null && arr_zcfg.length > 0){
					news_vue.hot_show = true;
					if(arr_zcfg.length >3){
						news_vue.more_show=true;
						newsListAll=arr_zcfg;
						var zfcgList=new Array();
						zfcgList.push(arr_zcfg[0]);
						zfcgList.push(arr_zcfg[1]);
						zfcgList.push(arr_zcfg[2]);
						news_vue.newsList=zfcgList;
					}else{
						news_vue.newsList = arr_zcfg;
					}
				}
				utils.closeWaiting();
			});
			var bszn_vue = new Vue({
				el: '#bsznDiv',
				data: {
					hot_show:false,
					more_show:false,
					bsznList:[]
				}					  
			});
			
			
			var news_vue = new Vue({
				el: '#newsDiv',
				data: {
					hot_show:false,
					more_show:false,
					newsList:[]
				}					  
			});
			
			
			//常见问题查看更多监听
			function bsznMore() {
				bszn_vue.hot_show = true;
				bszn_vue.more_show=false;
				bszn_vue.bsznList = bsznListAll;
			}
			
			//常见问题查看更多监听
			function newsMore() {
				news_vue.hot_show = true;
				news_vue.more_show=false;
				news_vue.newsList = newsListAll;
			}
			
			
			mui('.hostory_list').on('tap','.toTarget',function(){
				var modelType=this.getAttribute('modelType');
				var oid=this.getAttribute('oid');
				if(modelType==1){//办事指南
					utils.showWaiting();
		            	var hsw = openNewWin('_www/src/work/bszn_info.html?serviceOid=' + oid,{bounce:'none'}, 'bszn_info');
		            	mui.fire(hsw,'getDetail',{serviceOid:oid});
				}
				if(modelType==4){//新闻
					utils.showWaiting();
					var oid = this.getAttribute('oid');
					var url = '../ygzw/public_info.html?oid='+oid;
					showTemplates('../ygzw/public_info.html','查看详情',url);
				}
				/**/
			});
		</script>
	</body>
</html>
